package com.jielihaofeng.business.rule.optional;

import java.util.Optional;

/**
 * @description
 * @author Johnnie Wind
 * @date 2021/6/7 22:38
 */
public class User {

    private String email;
    private String position;
    private Address address;

    public User(String email,String position){
        this.email = email;
        this.position = position;
    }

    public String getEmail() {
        return email;
    }

    public Optional<String> getPosition() {
        return Optional.ofNullable(position);
    }

    public Optional<Address> getAddress() {
        return Optional.ofNullable(address);
    }

}
